home *** CD-ROM | disk | FTP | other *** search
/ SGI Enlighten DSM 1.1 / SGI EnlightenDSM 1.1.iso / sco5x / common / scripts / user.rc
Text File  |  1998-06-30  |  757b  |  37 lines

  1. #
  2. #  Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
  3. #             -- All Rights Reserved --
  4. #
  5.  
  6. # Arg 1: gecos (realname, telephone, office)
  7. # Arg 2: home directory
  8. # Arg 3: uid
  9. # Arg 4: gid
  10. # Arg 5: shell
  11. # Arg 6: login name
  12.  
  13. # NOTE: if the parameter CREATEHOMEDIR == 0
  14. # then the home directory may not exist when
  15. # this script executes
  16.  
  17. if test -d $2 ; then
  18.     shell=`basename "$5"`
  19.     case $shell in
  20.         sh)   files="sh/profile" ;;
  21.         rsh)  files="rsh/profile" ;;
  22.         csh)  files="csh/cshrc csh/login" ;;
  23.         ksh)  files="ksh/profile ksh/kshrc" ;;
  24.         rksh) files="rksh/profile rksh/rkshrc" ;;
  25.         *)    files=sh/profile ;;
  26.     esac
  27.  
  28.     for i in $files
  29.     do
  30.         rc=/usr/lib/mkuser/$i
  31.         if test -f $rc ; then
  32.             /bin/cp $rc "$2"/.`basename $rc`
  33.         fi
  34.     done
  35. fi
  36. exit 0
  37.